package com.example.demowx.model;

import com.thoughtworks.xstream.annotations.XStreamAlias;

import java.util.Map;

/**
 * @author pengyifeng
 * @version 1.0.0
 * @ClassName baseMessage.java
 * @Description TODO
 * @createTime 2020年11月25日 10:26:00
 */
public class BaseMessage {

    /**
     * 接收方
     */
    @XStreamAlias("ToUserName")
    private String toUserName;
    /**
     * 发送发
     */
    @XStreamAlias("FromUserName")
    private String fromUserName;
    /**
     * 创建时间
     */
    @XStreamAlias("CreateTime")
    private String createTime;
    /**
     * 消息类型
     */
    @XStreamAlias("MsgType")
    private String msgType;

    public String getToUserName() {
        return toUserName;
    }

    public void setToUserName(String toUserName) {
        this.toUserName = toUserName;
    }

    public String getFromUserName() {
        return fromUserName;
    }

    public void setFromUserName(String fromUserName) {
        this.fromUserName = fromUserName;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getMsgType() {
        return msgType;
    }

    public void setMsgType(String msgType) {
        this.msgType = msgType;
    }
    public BaseMessage(Map<String, String> requestMap) {
        this.toUserName=requestMap.get("FromUserName");
        this.fromUserName=requestMap.get("ToUserName");
        this.createTime=System.currentTimeMillis()/1000+"";
    }

}
